package com.yanqu.road.server.cmd.unionwar;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.unionwar.CrossUnionWarProto;
import com.yanqu.road.server.cmd.CrossUnionCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.unionwar.CrossUnionWarMgr;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.C_CROSS_UNION_WAR_REQ_FINALS_RESULT, desc = "决赛淘汰信息")
public class CrossGetEliminationInfoCmd extends CrossUnionCommand {

    int activityId;

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        CrossUnionWarProto.CrossGetEliminationInfoReqMsg reqMsg = CrossUnionWarProto.CrossGetEliminationInfoReqMsg.parseFrom(packet.getBytes());
        activityId = reqMsg.getActivityId();
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        CrossUnionWarMgr.getGetEliminationInfo(serverId, activityId);
    }

    @Override
    public void sendData() {

    }
}
